#ifndef WND_H
#define WND_H

#include <QWidget>

class Wnd : public QWidget
{
	Q_OBJECT

public:
	Wnd(QWidget *parent = NULL, QString text = QString());
	~Wnd();

protected:
	void paintEvent(QPaintEvent* e);
	bool event(QEvent* e);

public:
	inline void setWndBk(QString bk)
	{
		wndBk.load(bk);
	}
	inline void setPath(QPainterPath path)
	{
		m_path = path;
	}
	inline void setColor(QColor color, QColor textColor = QColor(255,255,255))
	{
		m_color = color;
		m_strColor = textColor;
	}
	inline void setBorderColor(QColor borderColor)
	{
		m_borderColor = borderColor;
	}
private:
	QPixmap wndBk;
	QPainterPath m_path;
	QString m_str;
	QColor m_color;
	QColor m_strColor;
	QColor m_borderColor;
};

#endif // WND_H
